<?php

function template_snet_admin_info_above()
{
	global $context, $settings, $scripturl, $txt, $snet_version;
	
	echo'
		<div id="snet_logo_container">
			<span class="upperframe"><span></span></span>
			<div class="roundframe">
				<img src="', $settings['default_images_url'] ,'/admin/snet/snet_logo.png" alt="',$txt['snet_admin_title'],'" />
			</div>
			<span class="lowerframe"><span></span></span>
		</div>';
		
	if($_REQUEST['sa'] != 'home')
		echo'
			<div class="title_bar">
				<h3 class="titlebg">
					<a href="',$scripturl,'?action=admin;area=snet-info;sa=home">',$txt['snet_admin_go_back_home'],'</a>
				</h3>
			</div>';
			
	// A welcome notice :)
	if(isset($_REQUEST['install']))
		echo'
			<div class="snet_popup windowbg" style="display: block;" id="snet_install_guide">
				<h5 class="catbg">
					Welcome to SimpleNetwork!
					<a href="#" onclick="$(\'#snet_install_guide\').fadeOut(); return false;">
						<img src="', $settings['default_images_url'] ,'/simplenetwork/delete.png" class="floatright" alt="" />
					</a>
				</h5><br />
				<div class="content">
					',$snet_version,' has been successfully installed on your forum. I hope you will enjoy using it.<br />
					If you find any bugs, please report them to me as soon as you can.<br />
					<br />
					<strong>First time user?</strong><br />
					If this is the first time you\'re installing SimpleNetwork, you should go ahead and <a href="',$scripturl,'?action=admin;area=snet-settings">set it up</a>.<br />
					<br />
					<strong>Manually upgraded?</strong><br />
					If you\'ve just manually upgraded from an earlier version of SimpleNetwork, don\'t forget to run <em>install.php</em>, which can be found in the package you downloaded.<br />
					If you do not run this file, your upgrade history will be broken and problems may occur the next time you update SimpleNetwork.<br />
					If you upgraded via your package manager, you will not have to worry.
				</div>
			</div>';
}

function template_snet_admin_info_below()
{
}

function template_snet_admin_info_home()
{
	global $context, $txt, $settings, $snet_version, $forum_version, $modSettings, $scripturl;
	
	echo'
		<div id="snet_admin_container">
			<div id="snet_about_author">
				<span class="upperframe"><span></span></span>
				<div class="roundframe">
					<h1 class="snet_meet_cookiemonster">',$txt['snet_admin_meet_cookiemonster'],'</h1>
					<hr />
					<div class="snet_aboutdev_pic">
						<img src="http://marcusforsberg.net/external_utilities/cookiemonster.png" alt="" />
					</div>				
<div class="snet_aboutdev_text">
<strong>Hello.</strong> My name is Marcus Forsberg, known on SMF as cookiemonster.<br /><br />
I\'m a Swedish 15 year-old amateur web developer based in &Aring;land Islands, Finland since 2008.<br />
I have a passion for the web, and the unique social experiences that we\'re granted through its power. My goal with SimpleNetwork is to let forum users interact with each other more closely,
by sharing thoughs and material that is interesting to them.<br />
I\'m currently going through my last term in middle school, after which I\'m going to study media and communication and later drama. I want to spend my future with movie making, something that I\'ve
dreamed of doing for several years, and keep following the rapid growth of technology and the Internet at the same time.
</div>
					<br class="clear" />
					<div style="text-align: center">
						<div class="cat_bar  snet_admin_button" style="display: inline-block; width: auto; float: left; margin-right: 7px;">
							<h3 class="catbg">
								<img src="', $settings['default_images_url'] ,'/admin/snet/website.png" alt="" class="snet_icon" />
								<a href="http://www.marcusforsberg.net/" target="_blank">',$txt['snet_admin_visit_website'],'</a>
							</h3>
						</div>
						<div class="cat_bar snet_admin_button" style="display: inline-block; width: auto; float: left;">
							<h3 class="catbg">
								<img src="', $settings['default_images_url'] ,'/admin/snet/coke.png" alt="" class="snet_icon" />
								<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=EPAVX6ZK2JMLC" target="_blank">',$txt['snet_admin_buy_coke'],'</a>
							</h3>
						</div>					
						<br class="clear" />
					</div>
				</div>
				<span class="lowerframe"><span></span></span>
			</div>
			<div id="snet_admin_main">
				<div class="information" id="snet_news_feed">
					<strong>News Feed:</strong><br />
					<span id="snet_news_feed_content">Fetching news from marcusforsberg.net... <img src="', $settings['default_images_url'] ,'/simplenetwork/loading.gif" alt="" class="floatright" /></span>
				</div>
				<span class="upperframe"><span></span></span>
				<div class="roundframe">
					<img src="', $settings['default_images_url'] ,'/admin/snet/version.png" alt="" id="snet_version_icon" /> <strong>',$txt['snet_admin_snet_version'],':</strong> ', $snet_version,'
					<a href="#" style="display: none;" class="snet_new_version smalltext" target="_blank"> - <strong>',$txt['snet_admin_new_version'],'</strong> <img src="', $settings['default_images_url'] ,'/admin/snet/warning.png" alt="" class="floatright" id="snet_new_version_warning" /></a>
					<hr />
					<img src="', $settings['default_images_url'] ,'/admin/snet/installation_date.png" alt="" /> <strong>',$txt['snet_admin_installation_date'],':</strong> ',timeformat($modSettings['snet_installation_date'],false),'
					<hr />
					<img src="', $settings['default_images_url'] ,'/admin/snet/latest_update.png" alt="" /> <strong>',$txt['snet_admin_latest_upgrade'],':</strong> 
					',empty($modSettings['snet_latest_update']) || $modSettings['snet_latest_update'] == '0' ? $txt['snet_admin_never_updated'] : $modSettings['snet_latest_update'], '',!empty($modSettings['snet_latest_update_time']) && $modSettings['snet_latest_update_time'] != 0 ? '<span class="smalltext"> ('.timeformat($modSettings['snet_latest_update_time'],false).')</span>' : '','
					',!empty($modSettings['snet_latest_update']) && $modSettings['snet_latest_update'] != '0' ? '<span class="smalltext floatright"><a href="'.$scripturl.'?action=admin;area=snet-info;sa=upgrades">'.$txt['snet_admin_info_upgrades'].'</a> <img src="'. $settings['default_images_url'].'/admin/snet/upgrade_log.png" alt="" class="snet_icon2" /></span>' : '','
					<hr />					
					<img src="', $settings['default_images_url'] ,'/admin/snet/smf_version.png" alt="" /> <strong>',$txt['snet_admin_smf_version'],':</strong> ', $forum_version,'
					<hr />
					<img src="', $settings['default_images_url'] ,'/admin/snet/users.png" alt="" /> <strong>',$txt['snet_admin_num_users'],':</strong> ',$context['num_users'],'
					<hr />		
					<img src="', $settings['default_images_url'] ,'/admin/snet/status_updates.png" alt="" /> <strong>',$txt['snet_admin_num_status_updates'],':</strong> ',$context['num_status_updates'],'
					<hr />	
					<img src="', $settings['default_images_url'] ,'/admin/snet/comments.png" alt="" /> <strong>',$txt['snet_admin_num_comments'],':</strong> ',$context['num_comments'],'
					<hr /><br />						
				</div>
				<span class="lowerframe"><span></span></span>
			</div>
			<br class="clear" />
		</div>
		<span style="display: none;" id="snet" />
			<script type="text/javascript" src="http://marcusforsberg.net/external_utilities/snet_latest_version.js"></script> 
			<script type="text/javascript" src="http://marcusforsberg.net/external_utilities/snet_latest_news.js"></script> 
			<script type="text/javascript">
				var installed_version = ',JavaScriptEscape($snet_version),'
				if((window.snet_latest_version != installed_version) && window.snet_latest_version)
				{
					var current_version_icon = $("#snet_version_icon").attr("src");
					current_version_icon = current_version_icon.replace(".png","");
					var new_version_html = $(".snet_new_version").html();
					new_version_html = new_version_html.replace("%s",window.snet_latest_version_short);
					$("#snet_version_icon").attr("src",current_version_icon + "_new.png");
					$(".snet_new_version").fadeIn(5000).attr("href",window.snet_latest_version_download).html(new_version_html);
					$("#snet_new_version_warning").blink();
				}
				if(window.snet_latest_news)
				{
					$("#snet_news_feed_content").html("<ul id=\"snet_news_ticker\" class=\"reset\">" + window.snet_latest_news + "</ul>");
					$("#snet_news_ticker").liScroll({travelocity: 0.06});
				}
			</script>';
}

?>